using System.Globalization;
using System.Reflection;

namespace UnitTesting.Fixturing
{
	class PositionedArgument<T> : GenericTypedArgument<T>
	{
		readonly int _position;

		public int Position
		{
			get { return _position; }
		}

		public PositionedArgument(int position, T value) : base(value)
		{
			_position = position;
		}

		public override bool Equals(ParameterInfo other)
		{
			return base.Equals(other) && _position == other.Position;
		}

		public override string ToString()
		{
			return string.Format(CultureInfo.InvariantCulture, "Position: {1}, {0}", base.ToString(), _position);
		}
	}
}